<template>
	<div id="HaiTao">
		<div class="container">
			<div class="commodity">
				<div v-for="(item,index) in HaiTao" :key="index" class="commodityBox">
					<div class="commodityImg">
						<img :src="item.cover" style="width: 100%;height: 80%; display: flex; " />
					</div>
					<div class="commodityText">
						<div class="commodityTextTitle">
							{{item.title}}
						</div>
						<div class="commodityTextPrice">
							{{item.price}}
						</div>
						<div class="commodityTextBottom">
							<div id="mallNames">{{item.mallName}}</div>
							<span style="margin-left: 5px;">|{{item.pubDate|formate}}</span>
							<img src="../../../../public/购物车.png"  style="position: absolute;right: 0;bottom: 2px;"/>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</template>

<script>
	export default{
		data(){
			return{
				HaiTao:[]
			}
		},
		mounted(){
			this.$http.get(this.$apis.HaiTao).then((resp)=>{
				this.HaiTao = resp.data.data
			})
		},
		filters:{
			formate(data){
				var d = new Date(data)
				return (d.getMonth()+1)+"-"+d.getDate();
			}
		}
	}
</script>


<style lang="scss" scoped>
	
</style>
